package fag.core.game.test.arkanoid;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import fag.core.game.Scene;

public class ArkanoidScene extends Scene {
	
	private BufferedImage background = null;
	
	private BufferedImage outline = null;
	
	public ArkanoidScene() {
		super();
		
		try {
			background = ImageIO.read(new File(System.getProperty("user.dir")+"/src/imgs/arkanoid/background/2.png"));
			outline = ImageIO.read(new File(System.getProperty("user.dir") + "/src/imgs/arkanoid/background/back.png"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	@Override
	protected void drawBackground(Graphics2D graphics2d) {
		graphics2d.drawImage(background, 0, 0, background.getWidth(), background.getHeight(), null);
		for(int i = 0; i * 15 < Arkanoid.WIDTH; ++i) {
			graphics2d.drawImage(outline, i * 15, Arkanoid.GAME_HEIGHT - 5, 15, 5, null);
		}
	}
	
	@Override
	protected void drawForeground(Graphics2D graphics2d) {

	}
}
